package OOday02.HomeWork2.Person;

public class Teacher extends Person {
    double salary;
    Teacher(){

    }
    Teacher(double salary,String name,int age,String address){
        super(name,age,address);
        this.salary=salary;
    }
    void teach(){
        System.out.println(name+"正在授课");
    }
    void sayHi(){
        System.out.println("大家好我是"+name+"今年"+age+"岁了，家住"+address+"是一名薪资"+salary+"的老师");
    }
}
